home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: FW_CStorageUnitSink
- Sent: 5/29/96 5:27 PM
- Received: 5/29/96 4:51 PM
- From: John Paulson, john_paulson@powertalk.apple.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
-
- FW_OStorageUnitSinks are not buffered. If you want to buffer i/o to an
- FW_OStorageUnitSink,
- create an FW_OStorageUnitSink and use an FW_PBufferedSink. However there is a
- caveat wrt
- buffering ODStorageUnits:
-
- Buffering sinks for reading is cool, buffering sinks for writing is
- not-so-cool.
-
- This is because the sink being buffered is frequently written to without going
- through the buffer.
- This occurs when your part writes to the buffered sink and you pass the
- ODStorageUnitSink to
- another routine (call it "foo") which writes to it. The data in the buffer is
- flushed at the wrong
- place, overwriting the data the "foo" routine wrote. There is no problem
- using buffered sinks for
- reading, as the FW_OBufferedSink checks that the buffer position is valid
- before reading from the
- buffer. That check cannot be done for writing.
-
- munch
-
- ------ From: ODF-Interest@CILabs.ORG, Wed, May 29, 1996 ------
-
- I've started converting from d11 and have a problem : I'm using
- FW_CStorageUnitSink::Read/Write
-
- FW_CStorageUnitSink - converted to SOM class FW_OStorageUnitSink; use
- FW_PStorageUnitSink
- FW_CStorageUnitSink::FW_CStorageUnitSink - use FW_PStorageUnitSink; (*) ev
- param added
- FW_CStorageUnitSink::Flush - gone; moved to FW_OBufferedSink
- FW_CStorageUnitSink::ReadPeek - gone; moved to FW_OBufferedSink
- FW_CStorageUnitSink::ReadPeekAdvance - gone; moved to FW_OBufferedSink
- FW_CStorageUnitSink::WritePeek - gone; moved to FW_OBufferedSink
- FW_CStorageUnitSink::WritePeekAdvance - gone; moved to FW_OBufferedSink
-
- Nice! But how can I get a FW_OBufferedSink having a FW_PStorageUnitSink ???
-
- Stephane.
-
-
-
-